<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head lang="en" th:replace="include/common/common :: commonHeader">
    <footer th:include="include/common/common :: layUiResource"></footer>
    <footer th:include="include/common/common :: blueCSSResource"></footer>
    <footer th:include="include/common/common :: zTreeCSSSource"></footer>
    <footer th:include="include/common/common :: zTreeJSSource"></footer>

    <script>
        layui.config({
            base: '/staticResource/layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index' , 'laytpl', 'table'] , function () {
            var layer = layui.layer
                ,element = layui.element
                ,admin = layui.admin
                ,$ = layui.jquery;

            element.render();

            //点击事件监听
            $(document).on('click' , function (event) {
                let targetId = event.target.id;

                if (targetId == 'import'){
                    $.ajax({
                        type:'POST',
                        url:'/a/member/excelImport',
                        dataType:'JSON',
                        cache:false,
                        processData: false,
                        contentType: false,
                        data:new FormData($('#importForm')[0]),
                        async:false,
                        success:function (result) {

                        },
                        error:function () {

                        }
                    });
                    return false;
                }
            });

        });
    </script>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <!--        左侧tree-->
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">
                    导入号码，excel格式
                </div>
                <div class="layui-card-body">
                    <form method="post" id="importForm" enctype="multipart/form-data">
                        <input type="file" name="file"><br>
                        <button type="button" class="btn" onsubmit="return false" id="import" >导入</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>